<?php
/**
 * TransactionController.php
 *
 * @copyright  2023 beikeshop.com - All Rights Reserved
 * @link       https://beikeshop.com
 * @author     TL <mengwb@guangda.work>
 * @created    2023-05-10 14:44:54
 * @modified   2023-05-10 14:44:54
 */

namespace Beike\Seller\Http\Controllers;

use Beike\Seller\Repositories\SellerTransactionRepo;
use Illuminate\Http\Request;

class TransactionController extends Controller
{
    /**
     * 获取列表
     *
     * @return mixed
     */
    public function index(Request $request)
    {
        $data = [
            'balance'      => SellerTransactionRepo::getBalance(current_seller_user()->seller_id),
            'transactions' => SellerTransactionRepo::list($request->all(), current_seller_user()->seller_id),
        ];

        return view('seller::pages.transactions.index', $data);
    }
}
